<template>
  <div id="app">
    <keep-alive>
      <router-view />
    </keep-alive>
    <van-tabbar v-model="active" :route="true">
      <van-tabbar-item
          v-for="(option,index) in tabOptions"
          :key="index"
          :name="option.name" replace
          :to="{
            name: option.name,
            path: '/' + (option.path || option.name)
          }"
          :icon="option.icon">
        {{ option.title }}
      </van-tabbar-item>
    </van-tabbar>
<!--    <van-action-sheet v-model="showAuthMobile" title="授权申请">-->
<!--      授权获取手机号-->
<!--    </van-action-sheet>-->
  </div>
</template>

<script>

  export default {
    data() {
      return {
        active: 'home',
        showAuthMobile: true,
        tabOptions: [
          {name: 'home',  title: '首页', icon: 'home-o'},
          {name: 'order', title: '订单', icon: 'orders-o', path: 'order/all'},
          {name: 'user', title: '我的', icon: 'friends-o'},
        ]
      }
    },
    created() {
      //
    },
    methods: {
    }
  }
</script>
<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}
</style>
